import {get, post, put, _delete} from '@/lin/plugin/axios'

class Document {
    static async getAll(page, count) {
        return await get(`/cms/document/page?page=${page}&count=${count}`)
    }

    static async delete(id) {
        return await _delete(`/cms/document/${id}`)
    }

    static async create(data) {
        return await post(`/cms/document`, data)
    }

    static async update(id, data) {
        return await put(`/cms/document/${id}`, data)
    }

    static async get(id) {
        return await get(`/cms/document/${id}`)
    }
} 

export default Document